gdk: Stop using gdk_device_get_surface_at_position
authorMatthias Clasen <mclasen@redhat.com>
Tue, 26 Mar 2019 00:36:45 +0000 (20:36 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 26 Mar 2019 22:12:55 +0000 (18:12 -0400)
We should always use the double variant.

gdk/wayland/gdksurface-wayland.c
gdk/win32/gdkdevicemanager-win32.c

index 0466112803d8e92370cd932210e82a2bf6edc994..984e26e6e370282f5dd62e6861439b8c4df35734 100644 (file)
@@ -2447,15 +2447,14 @@ gdk_wayland_surface_map (GdkSurface *surface)
                     GDK_SURFACE_IMPL_WAYLAND (attached_grab_surface->impl);
                   grab_device = gdk_seat_get_pointer (attached_impl->grab_input_seat);
                   transient_for =
-                    gdk_device_get_surface_at_position (grab_device,
-                                                       NULL, NULL);
+                    gdk_device_get_surface_at_position_double (grab_device, NULL, NULL);
                 }
             }
           else
             {
               grab_device = gdk_seat_get_pointer (impl->grab_input_seat);
               transient_for =
-                gdk_device_get_surface_at_position (grab_device, NULL, NULL);
+                gdk_device_get_surface_at_position_double (grab_device, NULL, NULL);
             }
 
           if (transient_for)
index d40cc96b6114ca1b148b5c4284c570c33ccb9f5c..a7043b40b4abd103c141e348474c7e794067ed29 100644 (file)
@@ -888,7 +888,7 @@ gdk_input_other_event (GdkDisplay *display,
   PACKET packet;
   gint root_x, root_y;
   gint num_axes;
-  gint x, y;
+  double x, y;
   guint translated_buttons, button_diff, button_mask;
   /* Translation from tablet button state to GDK button state for
    * buttons 1-3 - swap button 2 and 3.
@@ -902,13 +902,13 @@ gdk_input_other_event (GdkDisplay *display,
     }
 
   device_manager = GDK_DEVICE_MANAGER_WIN32 (_gdk_device_manager);
-  window = gdk_device_get_surface_at_position (device_manager->core_pointer, &x, &y);
+  window = gdk_device_get_surface_at_position_double (device_manager->core_pointer, &x, &y);
 
   if (window)
     g_object_ref (window);
 
   GDK_NOTE (EVENTS_OR_INPUT,
-           g_print ("gdk_input_other_event: window=%p %+d%+d\n",
+           g_print ("gdk_input_other_event: window=%p %+g%+g\n",
                window ? GDK_SURFACE_HWND (window) : NULL, x, y));
 
   if (msg->message == WT_PACKET || msg->message == WT_CSRCHANGE)